<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Replication environment IDs</title>
    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
    <link rel="up" href="rep.html" title="Chapter 13.  Berkeley DB Replication" />
    <link rel="prev" href="rep.html" title="Chapter 13.  Berkeley DB Replication" />
    <link rel="next" href="rep_pri.html" title="Replication environment priorities" />
  </head>
  <body>
    <div xmlns="" class="navheader">
      <div class="libver">
        <p>Library Version 12.1.6.2</p>
      </div>
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Replication environment IDs</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="rep.html">Prev</a> </td>
          <th width="60%" align="center">Chapter 13.  Berkeley DB Replication </th>
          <td width="20%" align="right"> <a accesskey="n" href="rep_pri.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title" style="clear: both"><a id="rep_id"></a>Replication environment IDs</h2>
          </div>
        </div>
      </div>
      <p>
        Each database environment included in a replication group
        must have a unique identifier for itself and for the other
        members of the replication group. The identifiers do not need
        to be global, that is, each database environment can assign
        local identifiers to members of the replication group as it
        encounters them. For example, given three sites: A, B and C,
        site A might assign the identifiers 1 and 2 to sites B and C
        respectively, while site B might assign the identifiers 301
        and 302 to sites A and C respectively. Note that it is not
        wrong to have global identifiers, it is just not a
        requirement.
    </p>
      <p>
        Replication Manager assigns and manages environment IDs on
        behalf of the application.
    </p>
      <p>
        It is the responsibility of a Base API application to label
        each incoming replication message passed to <a href="../api_reference/C/repmessage.html" class="olink">DB_ENV-&gt;rep_process_message()</a>
        method with the appropriate identifier. Subsequently, Berkeley
        DB will label outgoing messages to the <span class="bold"><strong>send</strong></span>
        function with those same
        identifiers.
    </p>
      <p>
        Negative identifiers are reserved for use by Berkeley DB,
        and should never be assigned to environments by the
        application. Two of these reserved identifiers are intended
        for application use, as follows:
    </p>
      <div class="variablelist">
        <dl>
          <dt>
            <span class="term">
              <a href="../api_reference/C/reptransport.html#transport_DB_EID_BROADCAST" class="olink">DB_EID_BROADCAST</a>
            </span>
          </dt>
          <dd>
            <p> 
                    The <a href="../api_reference/C/reptransport.html#transport_DB_EID_BROADCAST" class="olink">DB_EID_BROADCAST</a> identifier indicates a
                    message should be broadcast to all members of a
                    replication group.
                </p>
          </dd>
          <dt>
            <a id="rep_id.DB_EID_INVALID"></a>
            <span class="term">DB_EID_INVALID</span>
          </dt>
          <dd>
            <p>
                    The DB_EID_INVALID identifier is an invalid
                    environment ID, and may be used to initialize
                    environment ID variables that are subsequently
                    checked for validity. 
                </p>
          </dd>
        </dl>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="rep.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="rep.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="rep_pri.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Chapter 13.  Berkeley DB Replication  </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> Replication environment priorities</td>
        </tr>
      </table>
    </div>
  </body>
</html>
